package com.example.springbasic.service;

import com.example.springbasic.dto.UserDto;
import org.springframework.stereotype.Service;

@Service("user")
//@Primary
public class UserServiceImpl implements UserService{
    @Override
    public String login(UserDto userDto){
        if(userDto.getUsername().equals("limou") && userDto.getPassword().equals("123456")){
            return "用户登陆成功！用户名：{"+userDto.getUsername()+"},密码为：{"+userDto.getPassword()+"}";
        }
        else {
            return "用户登陆失败！用户名：{"+userDto.getUsername()+"},密码为：{"+userDto.getPassword()+"}";
        }

    }

    @Override
    public String registerAndParma(UserDto userDto, String module, String desc, String age) {
        return null;
    }
}
